Environment Variables

Contents|Index|Previous|Next
Environment variables

You can change the behavior of ld with the environment variable GNUTARGET.

GNUTARGET determines the input-file object format if you don’t use -b (or its synonym, ‘-format’). Its value should be one of the BFD names for an input format (see BFD). If there is no GNUTARGET in the environment, ld uses the natural format of the target. If GNUTARGET is set to default , then BFD attempts to discover the input format by examining binary input files; this method often succeeds, but there are potential ambiguities, since there is no method of ensuring that the magic number used to specify object-file formats is unique. However, the configuration procedure for BFD on each system places the conventional format for that system first in the search-list, so ambiguities are resolved in favor of convention.

Top|Contents|Index|Previous|Next